package com.selune.online.ordering.system.project.api.service.customer;

import com.selune.online.ordering.system.project.api.base.response.Response;
import com.selune.online.ordering.system.project.api.pojo.user.customer.dto.CustomerAddressDTO;
import com.selune.online.ordering.system.project.api.pojo.user.customer.vo.CustomerAddressVO;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @author xiaoyp
 * @date 2020/3/22
 * <p>
 * Description:
 */
public interface ICustomerAddressService {
	
	/**
	 * 添加收货地址
	 *
	 * @param userId             用户id
	 * @param customerAddressDTO 地址信息DTO
	 * @return True/False
	 */
	Response<Boolean> saveAddress(Long userId, CustomerAddressDTO customerAddressDTO);
	
	/**
	 * 根据id更新收货地址
	 *
	 * @param id                 收货地址id
	 * @param customerAddressDTO 地址信息DTO
	 * @return True/False
	 */
	Response<Boolean> updateAddress(Long id, CustomerAddressDTO customerAddressDTO);
	
	/**
	 * 查看用户下的所有地址
	 *
	 * @param userId 用户id
	 * @return List
	 */
	Response<List<CustomerAddressVO>> addressList(Long userId);
	
	/**
	 * 根据id删除收货地址
	 *
	 * @param id 收货地址id
	 * @return True/False
	 */
	Response<Boolean> deleteAddressById(Long id);
	
	/**
	 * 根据id批量删除收货地址
	 *
	 * @param ids 收货地址ids
	 * @return True/False
	 */
	Response<Boolean> deleteAddressByIds(List<Long> ids);
}
